/* craco.config.js */

const CracoLessPlugin = require("craco-less");

module.exports = {
    plugins: [{
        plugin: CracoLessPlugin,
        options: {
            lessLoaderOptions: {
                lessOptions: {
                    modifyVars: { "@primary-color": "#000000" },
                    javascriptEnabled: true,
                },
            },
        },
    }, ],
    devServer: {
        proxy: {
            "/api/teaching/v1": {
                target: "http://test.arvroffer.com", //后台服务地址
                //target: 'http://192.168.1.173:8081',
                changeOrigin: true,
                //pathRewrite: { '^/api/teaching/': '' },
                pathRewrite: {
                    "^": "",
                },
            },
            "/api/user/v1": {
                target: "http://test.arvroffer.com", //后台服务地址
                changeOrigin: true,
                pathRewrite: {
                    "^": "",
                },
            },
            "/api/utils/v1": {
                target: "http://test.arvroffer.com", //后台服务地址
                changeOrigin: true,
                pathRewrite: {
                    "^": "",
                },
            },
            "/fileUpload": {
                target: "http://test.arvroffer.com", //后台服务地址
                changeOrigin: true,
                pathRewrite: {
                    "^": "",
                },
            }
        },
    },
};